home *** CD-ROM | disk | FTP | other *** search
- UNIT CodeSizeLimits;
- {-------------------------------------------}
- (*
- ©1988 by Steve Seaquist. All rights reserved.
- Used by permission. Use at your own risk.
- No warranty is expressed or implied.
-
- This Macintosh virus-detecting program was
- originally published and explained in the
- February 1989 issue of MacTutor magazine.
- Some aspects of its design are important to
- security, and it uses some unusual
- techniques, so please read the article.
- *)
- {-------------------------------------------}
- INTERFACE
-
- VAR
- gJTSize: INTEGER;
- gEntryPoint: LONGINT;
- gSizeLimit:
- ARRAY [0..3] OF LONGINT;
- gMaxCode: INTEGER;
-
- PROCEDURE GetCodeSizeLimits;
-
- {*******************************************}
- IMPLEMENTATION
- PROCEDURE SecurityPatrol; EXTERNAL;
- {-------------------------------------------}
- PROCEDURE GetCodeSizeLimits;
- BEGIN
- gEntryPoint := ORD4(@SecurityPatrol);
- gJTSize := 752;
- gMaxCode := 3;
- gSizeLimit[0] := gJTSize + 16;
- gSizeLimit[1] := 15000;
- gSizeLimit[2] := 11100;
- gSizeLimit[3] := 23600;
- END;
- {*******************************************}
- END.